//  请求参数
export interface AttrListParams {
  category1Id: number;
  category2Id: number;
  categoty3Id: number;
}

// 返回值

/* 
[
    {
      "id": 106,
      "createTime": null,
      "updateTime": null,
      "attrName": "手机一级",
      "categoryId": 2,
      "categoryLevel": 1,
      "attrValueList": [
        {
          "id": 219,
          "createTime": null,
          "updateTime": null,
          "valueName": "花木兰",
          "attrId": 106
        },]
    }
]
*/

export interface AttrValueItem {
  id?: number;
  valueName: string;
}

export type AttrValueList = AttrValueItem[];

export interface AttrItem {
  id?: number;
  attrName: string;
  attrValueList: AttrValueList;
}

export type AttrsList = AttrItem[];



// 添加属性参数类型
export interface SaveAttrApiParams extends AttrItem {
  categoryId: number;
  categoryLevel: number;
}

// 添加属性使用的类型

export interface SaveAttrValueItem extends AttrValueItem {
  isEdit: boolean;
}

export interface SaveAttrItem extends AttrItem {
  attrValueList: SaveAttrValueItem[];
}


// 定义attrs 属性类型

// export interface AttrValueItem {
//   valueName: string;
//   isEdit: boolean;
// }
// export type IAttrValueList = AttrValueItem[];

// export interface AttrFormData {
//   attrName: string;
//   attrValueList: IAttrValueList;
// }

// 添加属性参数类型

// export interface SaveAttrApiParams {
//   attrName: string;
//   attrValueList: [
//     {
//       valueName: string;
//     }
//   ];
//   categoryId: 0;
//   categoryLevel: 0;
// }
